<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:import href="base-template.imp.xsl" />
	
	<xsl:param name="title" select="''" />
	<xsl:param name="content" select="''" />
	<xsl:param name="art_id" select="''"/>
	<xsl:param name="link" select="''"/>
	<xsl:param name="category" select="''"/>
	
	<xsl:output encoding="UTF-8" method="html" saxon:character-representation="native" xmlns:saxon="http://saxon.sf.net/"/>
	<xsl:template name="content">
		<div class="title" >Создание и редактирование статей</div>
		<form name="news" action="/article/editor/check" method="post" enctype="multipart/form-data">
		<xsl:if test="$art_id">
					<input type="hidden" name="art_id" value="{$art_id}" />
			</xsl:if>
		<table>
			<tr>
				<td class="text"  >Наименование статьи: </td>
				<td><input type="text" name="title" value="{$title}" style="width:100%"/></td>
			</tr>
			<tr>
				<td class="text">Раздел: </td>
				<td>
					<select name="category" style="width: 100%">
						<xsl:for-each select="//page/all-categoryes/Category">
							<xsl:choose>
								<xsl:when test="@id=$category">
									<option value="{@id}" selected="selected"><xsl:value-of select="@title" /></option>
								</xsl:when>
								<xsl:otherwise>
									<option value="{@id}"><xsl:value-of select="@title" /></option>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
					</select>				
					
					<div style="width:30em; height:1px"/>
				</td>
			</tr>
			<tr>
				<td class="text"   >Link статьи: (английское наименование статьи)</td>
				<td><input type="text" name="link" value="{$link}" style="width:100%" /></td>
			</tr>
		</table>
		<div class="text">Содержание статьи:</div>
		<div style="height:500px"><input type="hidden" id="editor" name="editor" value="{$content}" style="display:none" /><input type="hidden" id="editor___Config" value="" style="display:none" /><iframe id="editor___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=editor&amp;Toolbar=Default" width="100%" height="100%" frameborder="0" scrolling="no"></iframe></div>
		<input type="submit" value="OK" />
		</form>
		
	</xsl:template>
					

</xsl:stylesheet>	